<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>用户管理</title>
	<meta name="decorator" content="default"/>
	<link rel="stylesheet" type="text/css" href="${ctxStatic}/IDH/css/exhibition/checkbox.css" />
	<script type="text/javascript">
		$(document).ready(function() {
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
		function isTrue(id){
			window.location.href = "${ctx}/accountInfo/disable?id=" + id;
		}
	</script>
	<style>
		.margin-right-10 {
			margin-right: 10px;
		}
	</style>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/accountInfo">用户列表</a></li>
		<%-- <shiro:hasPermission name="accountInfo:edit"><li><a href="${ctx}/accountInfo/form">用户添加</a></li></shiro:hasPermission> --%>
	</ul>
	<form:form id="searchForm" modelAttribute="accountInfo" action="${ctx}/accountInfo/list" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<%-- <sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();"/> --%>
		<ul class="ul-form">
			<li class="btns">
	
					<input class="margin-right-10" type="text" name="username" placeholder="用户名称"/>
					<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
				
			</li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>用户名称</th>
				<th>电话</th>
				<th>邮箱</th>
				<th>注册时间</th>
				<th>状态</th>
			<!--	<th>回复时间</th> -->
		    <shiro:hasPermission name="accountInfo:edit"><th>操作</th></shiro:hasPermission></tr></thead>
		
		<%-- <thead>
			<tr>
				<shiro:hasPermission name="entity:accountInfo:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead> --%>
		<tbody>
		<c:forEach items="${page.list}" var="accountInfo">
			<tr>
			    <td>${accountInfo.username}</td>
				<td>${accountInfo.telNum}</td>
				<td>${accountInfo.email}</td>
				<td><fmt:formatDate value="${accountInfo.createTime}" type="both"/></td>
				<td><c:if test="${accountInfo.userStatus==1}">
						<shiro:hasPermission name="accountInfo:edit">
						<input type="checkbox" id="${accountInfo.id}"  class="chk" checked/><label onclick="isTrue('${accountInfo.id}&&disableStatus=false')" for="${accountInfo.id}"></label>
						</shiro:hasPermission>
					</c:if>
					<c:if test="${accountInfo.userStatus==0}">
						<shiro:hasPermission name="accountInfo:edit">
						<input type="checkbox" id="${accountInfo.id}"  class="chk"/><label onclick="isTrue('${accountInfo.id}&&disableStatus=true')" for="${accountInfo.id}"></label>
						</shiro:hasPermission>
					</c:if>
					<c:if test="${accountInfo.userStatus==2}">注销</c:if></td>
				<shiro:hasPermission name="accountInfo:edit"><td>
    				<a href="${ctx}/accountInfo/form?id=${accountInfo.id}">查看</a>
					<%-- <a href="${ctx}/accountInfo/delete?id=${accountInfo.id}" onclick="return confirmx('确认要删除该用户吗？', this.href)">删除</a> --%>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>

</html>